# -*- coding: utf-8 -*-
"""
@Time    : 2021/10/9 17:23
@Author  : Leibuyun
@File    : 1.11 命名切片.py
"""

if __name__ == '__main__':
    record = '....................100 .......513.25 ..........'
    # 使用slice(start, stop, step)来创建切片对象
    SHARES = slice(20, 23)
    PRICE = slice(31, 37)
    cost = int(record[SHARES]) * float(record[PRICE])